<template>
  <div>
    <h1>router测试页面</h1>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { generateMenus, getChildrenRoutes, filterRouters } from '@/utils/route'
//import { constantRoute } from '@/router/routes'

//获取完整路由表数据
const router = useRouter()
console.log(router.getRoutes())
let fullRoute = router.getRoutes()

let children = getChildrenRoutes(fullRoute)

let filt = filterRouters(fullRoute)

console.log('children', children)

console.log('filt', filt)

console.log('generate', generateMenus(filt))

// let f =  generateMenus(fullRoute)

// console.log(f)

// console.log('filterRoutes',filterRoutes(fullRoute))
</script>

<style scoped></style>
